In many single chip microcontrollers (MCU's), a manufacturer will offer a mask option feature. Generally, a mask option is an option a user chooses when ordering mask read only memory (ROM) devices which customizes the functionality of the mask ROM. For example, a mask option could be used to choose whether or not an on-chip peripheral is active, the function of input/output (I/O) pins, and even some electrical characteristics of the device.
Mask ROM devices typically use a mask layer during a fabrication step to include the user's desired software and data options for the MCU device. When a mask layer is used, the software and data options are considered permanent and may not be modified after the fabrication process. When the mask option is implemented internally within the MCU device, one or more signal lines will be required to be a logic one or a logic zero value. These signal lines will then be used to configure the option based on circuitry internal to the MCU device.
A mask option register (MOR) is a circuit which allows an external user to emulate the mask option feature of a MCU device having a ROM in a MCU device having either an electrically programmable read only memory (EPROM) or an electrically erasable programmable read only memory (EEPROM). The EPROM and EEPROM are non-volatile memories which may be programmed to have the software and data options desired in a MCU device after fabrication. The non-volatile memory in a MCU device stores the option information which may be read and then used to force the option signals to an appropriate logic state.
A challenge in the design of the MOR for an EPROM-based MCU device is the desire to have the mask option signals operate with the same electrical and functional characteristics as the masked ROM-based MCU device. The same electrical and functional characteristics are desired because the EPROM/EEPROM-based MCU device generally serves as an emulation device for the ROM-based version. Additionally, it is not desirable to stock several versions of an EPROM or EEPROM-based MCU device with all possible mask option variations. In most implementations, several devices would be required to implement every possible option configuration.
Currently, a MOR is typically implemented using either a static latched design or a continuous refresh design. In the static latched design, mask option data is stored in a portion of an EPROM in a MCU device. A remaining portion of the EPROM is used to store the software and data required to operate the MCU device. When the MCU receives a reset (due to powering up or the system forcing a reset onto the microcontroller), the mask option information is read from the EPROM and stored in static latches which will remember the state of the data.
In the static latched design, the MOR is totally dependent on the operational parameters of the EPROM block. Therefore, the mask option signals are only valid within the operating voltages, frequencies, and temperatures at which the EPROM block may perform. Second, the state of the mask option signals is not valid until the assertion of the reset signal has terminated. Therefore, there are some types of mask options which may not be implemented in the static latched MOR design because the mask options must be valid during a reset sequence. Thirdly, the state of the mask options is held in latches which may become corrupt under adverse conditions with no possibility of recovery.